package cn.itwangxiang.android.ui;

import cn.itwangxiang.android.R;
import cn.itwangxiang.android.ui.DemoLayoutFrame;
import cn.itwangxiang.android.ui.DemoLayoutLinear;
import cn.itwangxiang.android.ui.DemoLayoutRelative;
import cn.itwangxiang.android.ui.DemoLayoutTable;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class DemoLayout extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.demo_layout);
		
		Button button1 = (Button) findViewById(R.id.button1);
		Button button2 = (Button) findViewById(R.id.button2);
		Button button3 = (Button) findViewById(R.id.button3);
		Button button4 = (Button) findViewById(R.id.button4);
		button1.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(DemoLayout.this,
						DemoLayoutLinear.class);
				startActivity(intent);
			}
		});
		button2.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(DemoLayout.this,
						DemoLayoutFrame.class);
				startActivity(intent);
			}
		});
		button3.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(DemoLayout.this,
						DemoLayoutRelative.class);
				startActivity(intent);
			}
		});
		button4.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(DemoLayout.this,
						DemoLayoutTable.class);
				startActivity(intent);
			}
		});
	}
}
